home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / UNIVERSAL.Z / UNIVERSAL
Encoding:
Text File  |  1998-10-28  |  3.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      UUUUNNNNIIIIVVVVEEEERRRRSSSSAAAALLLL((((3333))))    22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))      UUUUNNNNIIIIVVVVEEEERRRRSSSSAAAALLLL((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       UNIVERSAL - base class for ALL classes (blessed references)
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           $io = $fd->isa("IO::Handle");
  13.           $sub = $obj->can('print');
  14.  
  15.           $yes = UNIVERSAL::isa($ref, "HASH");
  16.  
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.       UNIVERSAL is the base    class which all    bless references will
  20.       inherit from,    see the    _p_e_r_l_o_b_j    manpage
  21.  
  22.       UNIVERSAL provides the following methods
  23.  
  24.       isa (    TYPE )
  25.           isa returns _t_r_u_e if REF is blessed into package TYPE or
  26.           inherits from package TYPE.
  27.  
  28.           isa can be called    as either a static or object method
  29.           call.
  30.  
  31.       can (    METHOD )
  32.           can checks if the    object has a method called METHOD. If
  33.           it does then a reference to the sub is returned. If it
  34.           does not then _u_n_d_e_f is returned.
  35.  
  36.           can can be called    as either a static or object method
  37.           call.
  38.  
  39.       VERSION ( [ REQUIRE ]    )
  40.           VERSION will return the value of the variable $VERSION
  41.           in the package the object    is blessed into. If REQUIRE is
  42.           given then it will do a comparison and die if the
  43.           package version is not greater than or equal to REQUIRE.
  44.  
  45.           VERSION can be called as either a    static or object
  46.           method call.
  47.  
  48.       The isa and can methods can also be called as    subroutines
  49.  
  50.       UNIVERSAL::isa ( VAL,    TYPE )
  51.           isa returns _t_r_u_e if the first argument is    a reference
  52.           and either of the    following statements is    true.
  53.  
  54.               VAL is a blessed reference and is    blessed    into
  55.               package TYPE or inherits from package TYPE
  56.  
  57.               VAL is a reference to a TYPE of perl variable
  58.               (er 'HASH')
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      UUUUNNNNIIIIVVVVEEEERRRRSSSSAAAALLLL((((3333))))    22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))      UUUUNNNNIIIIVVVVEEEERRRRSSSSAAAALLLL((((3333))))
  71.  
  72.  
  73.  
  74.       UNIVERSAL::can ( VAL,    METHOD )
  75.           If VAL is    a blessed reference which has a    method called
  76.           METHOD, can returns a reference to the subroutine.   If
  77.           VAL is not a blessed reference, or if it does not    have a
  78.           method METHOD, _u_n_d_e_f is returned.
  79.  
  80.       These    subroutines should _n_o_t be imported via use UNIVERSAL
  81.       qw(...).  If you want    simple local access to them you    can do
  82.  
  83.         *isa = \&UNIVERSAL::isa;
  84.  
  85.       to import isa    into your package.
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 10/23/98)
  130.  
  131.  
  132.  
  133.